package tma.sdcbatch11.foodordering;

import java.util.ArrayList;

import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;

@SuppressLint("NewApi")
public class Cart_turn_page extends Activity implements OnClickListener{

	//ArrayList<Cart> arrCart;
	//private MyArrayAdapter_cart adapter_cart;
	
	@Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.menu_icon, menu);
        
        findViewById(R.id.button1).setOnClickListener(this);
        
        return true;
    }
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.cart);
//		Init();
//        getActionBar().setDisplayHomeAsUpEnabled(true);
//        Button btnClose = (Button) findViewById(R.id.button1);
//        btnClose.setOnClickListener(new View.OnClickListener() {
//			public void onClick(View arg0) {
//				finish();
//			}
//		});
        
    }
//	public void Init() {
//		Cart[] list = createList();		
//		ListView listView = (ListView) findViewById(R.id.lvCart);
//		adapter_cart = new MyArrayAdapter_cart(this, list);
//		listView.setAdapter(adapter_cart);
//	}

//	public Cart[]createList(){
//		Cart[] items = new Cart[3];
//		String[] quan = getResources().getStringArray(R.array.quantity);
//		String[] dishName = getResources().getStringArray(R.array.dishName);
//		String[] price = getResources().getStringArray(R.array.price);
//			
//		for(int i = 0; i < items.length; i++){
//				items[i] = new Cart(quan[i], dishName[i], price[i]);
//		}
//		return items;
//	}
	@Override
	public void onClick(View v) {
		Intent checkout = new Intent(getApplicationContext(), Checkout.class);
		startActivity(checkout);		
	}

}
